fn main() {
    // let s: String = String::from("hello");
    // let mut s = String::from("hello");

    // let len: usize = calculate_length(&mut s);
    /*
    let _s2 = &s;
    let _s3 = &s;
    let _s4 = &mut s; */
    /*     let len: usize = {
        let s: &mut String = &mut s;
        // s.push_str(",world");
        s.push_str(",world");
        s.len()
    }; */

    // println!("{}", len);

    /*     let mut s = String::from("hello");

    let r1 = &s; // no problem
    let r2 = &s; // no problem
    let r3 = &mut s; // BIG PROBLEM

    println!("{}, {}, and {}", r1, r2, r3); */
}

/* fn calculate_length(s: &mut String) -> usize {
    // s.push_str(",world");
    s.push_str(",world");
    s.len()
}
 */
